﻿using System.Linq;
using MongoDB.Bson;

namespace yiCommerce.Core.Data
{
    /// <summary>
    /// Repository
    /// </summary>
    public partial interface IMongoRepository<T> where T : BaseMongoEntity
    {
        T GetById(string entityName, ObjectId id);
        ObjectId Insert(string entityName, T entity);
        void Update(T entity);
        void Delete(T entity);
        IQueryable<T> Table(string entityName);
    }
}
